local ffi = require 'ffi'
ffi.cdef[[
/* + BEGIN /usr/include/GLES3/gl3.h */
/* ++ BEGIN /usr/include/GLES3/gl3platform.h */
/* +++ BEGIN /usr/include/KHR/khrplatform.h */
]] require 'ffi.req' 'KHR.khrplatform' ffi.cdef[[
/* +++ END   /usr/include/KHR/khrplatform.h */
/* ++ END   /usr/include/GLES3/gl3platform.h */
/* #define GL_APIENTRYP GL_APIENTRY* ### string, not number "GL_APIENTRY*" */
enum { GL_GLES_PROTOTYPES = 1 };
enum { GL_ES_VERSION_2_0 = 1 };
/* ++ BEGIN /usr/include/KHR/khrplatform.h */
]] require 'ffi.req' 'KHR.khrplatform' ffi.cdef[[
/* ++ END   /usr/include/KHR/khrplatform.h */
typedef khronos_int8_t GLbyte;
typedef khronos_float_t GLclampf;
typedef khronos_int32_t GLfixed;
typedef khronos_int16_t GLshort;
typedef khronos_uint16_t GLushort;
typedef void GLvoid;
typedef struct __GLsync *GLsync;
typedef khronos_int64_t GLint64;
typedef khronos_uint64_t GLuint64;
typedef unsigned int GLenum;
typedef unsigned int GLuint;
typedef char GLchar;
typedef khronos_float_t GLfloat;
typedef khronos_ssize_t GLsizeiptr;
typedef khronos_intptr_t GLintptr;
typedef unsigned int GLbitfield;
typedef int GLint;
typedef unsigned char GLboolean;
typedef int GLsizei;
typedef khronos_uint8_t GLubyte;
enum { GL_DEPTH_BUFFER_BIT = 256 };
enum { GL_STENCIL_BUFFER_BIT = 1024 };
enum { GL_COLOR_BUFFER_BIT = 16384 };
enum { GL_FALSE = 0 };
enum { GL_TRUE = 1 };
enum { GL_POINTS = 0 };
enum { GL_LINES = 1 };
enum { GL_LINE_LOOP = 2 };
enum { GL_LINE_STRIP = 3 };
enum { GL_TRIANGLES = 4 };
enum { GL_TRIANGLE_STRIP = 5 };
enum { GL_TRIANGLE_FAN = 6 };
enum { GL_ZERO = 0 };
enum { GL_ONE = 1 };
enum { GL_SRC_COLOR = 768 };
enum { GL_ONE_MINUS_SRC_COLOR = 769 };
enum { GL_SRC_ALPHA = 770 };
enum { GL_ONE_MINUS_SRC_ALPHA = 771 };
enum { GL_DST_ALPHA = 772 };
enum { GL_ONE_MINUS_DST_ALPHA = 773 };
enum { GL_DST_COLOR = 774 };
enum { GL_ONE_MINUS_DST_COLOR = 775 };
enum { GL_SRC_ALPHA_SATURATE = 776 };
enum { GL_FUNC_ADD = 32774 };
enum { GL_BLEND_EQUATION = 32777 };
enum { GL_BLEND_EQUATION_RGB = 32777 };
enum { GL_BLEND_EQUATION_ALPHA = 34877 };
enum { GL_FUNC_SUBTRACT = 32778 };
enum { GL_FUNC_REVERSE_SUBTRACT = 32779 };
enum { GL_BLEND_DST_RGB = 32968 };
enum { GL_BLEND_SRC_RGB = 32969 };
enum { GL_BLEND_DST_ALPHA = 32970 };
enum { GL_BLEND_SRC_ALPHA = 32971 };
enum { GL_CONSTANT_COLOR = 32769 };
enum { GL_ONE_MINUS_CONSTANT_COLOR = 32770 };
enum { GL_CONSTANT_ALPHA = 32771 };
enum { GL_ONE_MINUS_CONSTANT_ALPHA = 32772 };
enum { GL_BLEND_COLOR = 32773 };
enum { GL_ARRAY_BUFFER = 34962 };
enum { GL_ELEMENT_ARRAY_BUFFER = 34963 };
enum { GL_ARRAY_BUFFER_BINDING = 34964 };
enum { GL_ELEMENT_ARRAY_BUFFER_BINDING = 34965 };
enum { GL_STREAM_DRAW = 35040 };
enum { GL_STATIC_DRAW = 35044 };
enum { GL_DYNAMIC_DRAW = 35048 };
enum { GL_BUFFER_SIZE = 34660 };
enum { GL_BUFFER_USAGE = 34661 };
enum { GL_CURRENT_VERTEX_ATTRIB = 34342 };
enum { GL_FRONT = 1028 };
enum { GL_BACK = 1029 };
enum { GL_FRONT_AND_BACK = 1032 };
enum { GL_TEXTURE_2D = 3553 };
enum { GL_CULL_FACE = 2884 };
enum { GL_BLEND = 3042 };
enum { GL_DITHER = 3024 };
enum { GL_STENCIL_TEST = 2960 };
enum { GL_DEPTH_TEST = 2929 };
enum { GL_SCISSOR_TEST = 3089 };
enum { GL_POLYGON_OFFSET_FILL = 32823 };
enum { GL_SAMPLE_ALPHA_TO_COVERAGE = 32926 };
enum { GL_SAMPLE_COVERAGE = 32928 };
enum { GL_NO_ERROR = 0 };
enum { GL_INVALID_ENUM = 1280 };
enum { GL_INVALID_VALUE = 1281 };
enum { GL_INVALID_OPERATION = 1282 };
enum { GL_OUT_OF_MEMORY = 1285 };
enum { GL_CW = 2304 };
enum { GL_CCW = 2305 };
enum { GL_LINE_WIDTH = 2849 };
enum { GL_ALIASED_POINT_SIZE_RANGE = 33901 };
enum { GL_ALIASED_LINE_WIDTH_RANGE = 33902 };
enum { GL_CULL_FACE_MODE = 2885 };
enum { GL_FRONT_FACE = 2886 };
enum { GL_DEPTH_RANGE = 2928 };
enum { GL_DEPTH_WRITEMASK = 2930 };
enum { GL_DEPTH_CLEAR_VALUE = 2931 };
enum { GL_DEPTH_FUNC = 2932 };
enum { GL_STENCIL_CLEAR_VALUE = 2961 };
enum { GL_STENCIL_FUNC = 2962 };
enum { GL_STENCIL_FAIL = 2964 };
enum { GL_STENCIL_PASS_DEPTH_FAIL = 2965 };
enum { GL_STENCIL_PASS_DEPTH_PASS = 2966 };
enum { GL_STENCIL_REF = 2967 };
enum { GL_STENCIL_VALUE_MASK = 2963 };
enum { GL_STENCIL_WRITEMASK = 2968 };
enum { GL_STENCIL_BACK_FUNC = 34816 };
enum { GL_STENCIL_BACK_FAIL = 34817 };
enum { GL_STENCIL_BACK_PASS_DEPTH_FAIL = 34818 };
enum { GL_STENCIL_BACK_PASS_DEPTH_PASS = 34819 };
enum { GL_STENCIL_BACK_REF = 36003 };
enum { GL_STENCIL_BACK_VALUE_MASK = 36004 };
enum { GL_STENCIL_BACK_WRITEMASK = 36005 };
enum { GL_VIEWPORT = 2978 };
enum { GL_SCISSOR_BOX = 3088 };
enum { GL_COLOR_CLEAR_VALUE = 3106 };
enum { GL_COLOR_WRITEMASK = 3107 };
enum { GL_UNPACK_ALIGNMENT = 3317 };
enum { GL_PACK_ALIGNMENT = 3333 };
enum { GL_MAX_TEXTURE_SIZE = 3379 };
enum { GL_MAX_VIEWPORT_DIMS = 3386 };
enum { GL_SUBPIXEL_BITS = 3408 };
enum { GL_RED_BITS = 3410 };
enum { GL_GREEN_BITS = 3411 };
enum { GL_BLUE_BITS = 3412 };
enum { GL_ALPHA_BITS = 3413 };
enum { GL_DEPTH_BITS = 3414 };
enum { GL_STENCIL_BITS = 3415 };
enum { GL_POLYGON_OFFSET_UNITS = 10752 };
enum { GL_POLYGON_OFFSET_FACTOR = 32824 };
enum { GL_TEXTURE_BINDING_2D = 32873 };
enum { GL_SAMPLE_BUFFERS = 32936 };
enum { GL_SAMPLES = 32937 };
enum { GL_SAMPLE_COVERAGE_VALUE = 32938 };
enum { GL_SAMPLE_COVERAGE_INVERT = 32939 };
enum { GL_NUM_COMPRESSED_TEXTURE_FORMATS = 34466 };
enum { GL_COMPRESSED_TEXTURE_FORMATS = 34467 };
enum { GL_DONT_CARE = 4352 };
enum { GL_FASTEST = 4353 };
enum { GL_NICEST = 4354 };
enum { GL_GENERATE_MIPMAP_HINT = 33170 };
enum { GL_BYTE = 5120 };
enum { GL_UNSIGNED_BYTE = 5121 };
enum { GL_SHORT = 5122 };
enum { GL_UNSIGNED_SHORT = 5123 };
enum { GL_INT = 5124 };
enum { GL_UNSIGNED_INT = 5125 };
enum { GL_FLOAT = 5126 };
enum { GL_FIXED = 5132 };
enum { GL_DEPTH_COMPONENT = 6402 };
enum { GL_ALPHA = 6406 };
enum { GL_RGB = 6407 };
enum { GL_RGBA = 6408 };
enum { GL_LUMINANCE = 6409 };
enum { GL_LUMINANCE_ALPHA = 6410 };
enum { GL_UNSIGNED_SHORT_4_4_4_4 = 32819 };
enum { GL_UNSIGNED_SHORT_5_5_5_1 = 32820 };
enum { GL_UNSIGNED_SHORT_5_6_5 = 33635 };
enum { GL_FRAGMENT_SHADER = 35632 };
enum { GL_VERTEX_SHADER = 35633 };
enum { GL_MAX_VERTEX_ATTRIBS = 34921 };
enum { GL_MAX_VERTEX_UNIFORM_VECTORS = 36347 };
enum { GL_MAX_VARYING_VECTORS = 36348 };
enum { GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 35661 };
enum { GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 35660 };
enum { GL_MAX_TEXTURE_IMAGE_UNITS = 34930 };
enum { GL_MAX_FRAGMENT_UNIFORM_VECTORS = 36349 };
enum { GL_SHADER_TYPE = 35663 };
enum { GL_DELETE_STATUS = 35712 };
enum { GL_LINK_STATUS = 35714 };
enum { GL_VALIDATE_STATUS = 35715 };
enum { GL_ATTACHED_SHADERS = 35717 };
enum { GL_ACTIVE_UNIFORMS = 35718 };
enum { GL_ACTIVE_UNIFORM_MAX_LENGTH = 35719 };
enum { GL_ACTIVE_ATTRIBUTES = 35721 };
enum { GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = 35722 };
enum { GL_SHADING_LANGUAGE_VERSION = 35724 };
enum { GL_CURRENT_PROGRAM = 35725 };
enum { GL_NEVER = 512 };
enum { GL_LESS = 513 };
enum { GL_EQUAL = 514 };
enum { GL_LEQUAL = 515 };
enum { GL_GREATER = 516 };
enum { GL_NOTEQUAL = 517 };
enum { GL_GEQUAL = 518 };
enum { GL_ALWAYS = 519 };
enum { GL_KEEP = 7680 };
enum { GL_REPLACE = 7681 };
enum { GL_INCR = 7682 };
enum { GL_DECR = 7683 };
enum { GL_INVERT = 5386 };
enum { GL_INCR_WRAP = 34055 };
enum { GL_DECR_WRAP = 34056 };
enum { GL_VENDOR = 7936 };
enum { GL_RENDERER = 7937 };
enum { GL_VERSION = 7938 };
enum { GL_EXTENSIONS = 7939 };
enum { GL_NEAREST = 9728 };
enum { GL_LINEAR = 9729 };
enum { GL_NEAREST_MIPMAP_NEAREST = 9984 };
enum { GL_LINEAR_MIPMAP_NEAREST = 9985 };
enum { GL_NEAREST_MIPMAP_LINEAR = 9986 };
enum { GL_LINEAR_MIPMAP_LINEAR = 9987 };
enum { GL_TEXTURE_MAG_FILTER = 10240 };
enum { GL_TEXTURE_MIN_FILTER = 10241 };
enum { GL_TEXTURE_WRAP_S = 10242 };
enum { GL_TEXTURE_WRAP_T = 10243 };
enum { GL_TEXTURE = 5890 };
enum { GL_TEXTURE_CUBE_MAP = 34067 };
enum { GL_TEXTURE_BINDING_CUBE_MAP = 34068 };
enum { GL_TEXTURE_CUBE_MAP_POSITIVE_X = 34069 };
enum { GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 34070 };
enum { GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 34071 };
enum { GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072 };
enum { GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 34073 };
enum { GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074 };
enum { GL_MAX_CUBE_MAP_TEXTURE_SIZE = 34076 };
enum { GL_TEXTURE0 = 33984 };
enum { GL_TEXTURE1 = 33985 };
enum { GL_TEXTURE2 = 33986 };
enum { GL_TEXTURE3 = 33987 };
enum { GL_TEXTURE4 = 33988 };
enum { GL_TEXTURE5 = 33989 };
enum { GL_TEXTURE6 = 33990 };
enum { GL_TEXTURE7 = 33991 };
enum { GL_TEXTURE8 = 33992 };
enum { GL_TEXTURE9 = 33993 };
enum { GL_TEXTURE10 = 33994 };
enum { GL_TEXTURE11 = 33995 };
enum { GL_TEXTURE12 = 33996 };
enum { GL_TEXTURE13 = 33997 };
enum { GL_TEXTURE14 = 33998 };
enum { GL_TEXTURE15 = 33999 };
enum { GL_TEXTURE16 = 34000 };
enum { GL_TEXTURE17 = 34001 };
enum { GL_TEXTURE18 = 34002 };
enum { GL_TEXTURE19 = 34003 };
enum { GL_TEXTURE20 = 34004 };
enum { GL_TEXTURE21 = 34005 };
enum { GL_TEXTURE22 = 34006 };
enum { GL_TEXTURE23 = 34007 };
enum { GL_TEXTURE24 = 34008 };
enum { GL_TEXTURE25 = 34009 };
enum { GL_TEXTURE26 = 34010 };
enum { GL_TEXTURE27 = 34011 };
enum { GL_TEXTURE28 = 34012 };
enum { GL_TEXTURE29 = 34013 };
enum { GL_TEXTURE30 = 34014 };
enum { GL_TEXTURE31 = 34015 };
enum { GL_ACTIVE_TEXTURE = 34016 };
enum { GL_REPEAT = 10497 };
enum { GL_CLAMP_TO_EDGE = 33071 };
enum { GL_MIRRORED_REPEAT = 33648 };
enum { GL_FLOAT_VEC2 = 35664 };
enum { GL_FLOAT_VEC3 = 35665 };
enum { GL_FLOAT_VEC4 = 35666 };
enum { GL_INT_VEC2 = 35667 };
enum { GL_INT_VEC3 = 35668 };
enum { GL_INT_VEC4 = 35669 };
enum { GL_BOOL = 35670 };
enum { GL_BOOL_VEC2 = 35671 };
enum { GL_BOOL_VEC3 = 35672 };
enum { GL_BOOL_VEC4 = 35673 };
enum { GL_FLOAT_MAT2 = 35674 };
enum { GL_FLOAT_MAT3 = 35675 };
enum { GL_FLOAT_MAT4 = 35676 };
enum { GL_SAMPLER_2D = 35678 };
enum { GL_SAMPLER_CUBE = 35680 };
enum { GL_VERTEX_ATTRIB_ARRAY_ENABLED = 34338 };
enum { GL_VERTEX_ATTRIB_ARRAY_SIZE = 34339 };
enum { GL_VERTEX_ATTRIB_ARRAY_STRIDE = 34340 };
enum { GL_VERTEX_ATTRIB_ARRAY_TYPE = 34341 };
enum { GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = 34922 };
enum { GL_VERTEX_ATTRIB_ARRAY_POINTER = 34373 };
enum { GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 34975 };
enum { GL_IMPLEMENTATION_COLOR_READ_TYPE = 35738 };
enum { GL_IMPLEMENTATION_COLOR_READ_FORMAT = 35739 };
enum { GL_COMPILE_STATUS = 35713 };
enum { GL_INFO_LOG_LENGTH = 35716 };
enum { GL_SHADER_SOURCE_LENGTH = 35720 };
enum { GL_SHADER_COMPILER = 36346 };
enum { GL_SHADER_BINARY_FORMATS = 36344 };
enum { GL_NUM_SHADER_BINARY_FORMATS = 36345 };
enum { GL_LOW_FLOAT = 36336 };
enum { GL_MEDIUM_FLOAT = 36337 };
enum { GL_HIGH_FLOAT = 36338 };
enum { GL_LOW_INT = 36339 };
enum { GL_MEDIUM_INT = 36340 };
enum { GL_HIGH_INT = 36341 };
enum { GL_FRAMEBUFFER = 36160 };
enum { GL_RENDERBUFFER = 36161 };
enum { GL_RGBA4 = 32854 };
enum { GL_RGB5_A1 = 32855 };
enum { GL_RGB565 = 36194 };
enum { GL_DEPTH_COMPONENT16 = 33189 };
enum { GL_STENCIL_INDEX8 = 36168 };
enum { GL_RENDERBUFFER_WIDTH = 36162 };
enum { GL_RENDERBUFFER_HEIGHT = 36163 };
enum { GL_RENDERBUFFER_INTERNAL_FORMAT = 36164 };
enum { GL_RENDERBUFFER_RED_SIZE = 36176 };
enum { GL_RENDERBUFFER_GREEN_SIZE = 36177 };
enum { GL_RENDERBUFFER_BLUE_SIZE = 36178 };
enum { GL_RENDERBUFFER_ALPHA_SIZE = 36179 };
enum { GL_RENDERBUFFER_DEPTH_SIZE = 36180 };
enum { GL_RENDERBUFFER_STENCIL_SIZE = 36181 };
enum { GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 36048 };
enum { GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 36049 };
enum { GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 36050 };
enum { GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 36051 };
enum { GL_COLOR_ATTACHMENT0 = 36064 };
enum { GL_DEPTH_ATTACHMENT = 36096 };
enum { GL_STENCIL_ATTACHMENT = 36128 };
enum { GL_NONE = 0 };
enum { GL_FRAMEBUFFER_COMPLETE = 36053 };
enum { GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 36054 };
enum { GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 36055 };
enum { GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 36057 };
enum { GL_FRAMEBUFFER_UNSUPPORTED = 36061 };
enum { GL_FRAMEBUFFER_BINDING = 36006 };
enum { GL_RENDERBUFFER_BINDING = 36007 };
enum { GL_MAX_RENDERBUFFER_SIZE = 34024 };
enum { GL_INVALID_FRAMEBUFFER_OPERATION = 1286 };
typedef void (* PFNGLACTIVETEXTUREPROC) (GLenum texture);
typedef void (* PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
typedef void (* PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
typedef void (* PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
typedef void (* PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer);
typedef void (* PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer);
typedef void (* PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture);
typedef void (* PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
typedef void (* PFNGLBLENDEQUATIONPROC) (GLenum mode);
typedef void (* PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
typedef void (* PFNGLBLENDFUNCPROC) (GLenum sfactor, GLenum dfactor);
typedef void (* PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
typedef void (* PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
typedef void (* PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
typedef GLenum (* PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target);
typedef void (* PFNGLCLEARPROC) (GLbitfield mask);
typedef void (* PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
typedef void (* PFNGLCLEARDEPTHFPROC) (GLfloat d);
typedef void (* PFNGLCLEARSTENCILPROC) (GLint s);
typedef void (* PFNGLCOLORMASKPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
typedef void (* PFNGLCOMPILESHADERPROC) (GLuint shader);
typedef void (* PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
typedef void (* PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
typedef void (* PFNGLCOPYTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
typedef void (* PFNGLCOPYTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
typedef GLuint (* PFNGLCREATEPROGRAMPROC) (void);
typedef GLuint (* PFNGLCREATESHADERPROC) (GLenum type);
typedef void (* PFNGLCULLFACEPROC) (GLenum mode);
typedef void (* PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
typedef void (* PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers);
typedef void (* PFNGLDELETEPROGRAMPROC) (GLuint program);
typedef void (* PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers);
typedef void (* PFNGLDELETESHADERPROC) (GLuint shader);
typedef void (* PFNGLDELETETEXTURESPROC) (GLsizei n, const GLuint *textures);
typedef void (* PFNGLDEPTHFUNCPROC) (GLenum func);
typedef void (* PFNGLDEPTHMASKPROC) (GLboolean flag);
typedef void (* PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f);
typedef void (* PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
typedef void (* PFNGLDISABLEPROC) (GLenum cap);
typedef void (* PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
typedef void (* PFNGLDRAWARRAYSPROC) (GLenum mode, GLint first, GLsizei count);
typedef void (* PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices);
typedef void (* PFNGLENABLEPROC) (GLenum cap);
typedef void (* PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
typedef void (* PFNGLFINISHPROC) (void);
typedef void (* PFNGLFLUSHPROC) (void);
typedef void (* PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
typedef void (* PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
typedef void (* PFNGLFRONTFACEPROC) (GLenum mode);
typedef void (* PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
typedef void (* PFNGLGENERATEMIPMAPPROC) (GLenum target);
typedef void (* PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);
typedef void (* PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers);
typedef void (* PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures);
typedef void (* PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
typedef void (* PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
typedef void (* PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
typedef GLint (* PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
typedef void (* PFNGLGETBOOLEANVPROC) (GLenum pname, GLboolean *data);
typedef void (* PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
typedef GLenum (* PFNGLGETERRORPROC) (void);
typedef void (* PFNGLGETFLOATVPROC) (GLenum pname, GLfloat *data);
typedef void (* PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
typedef void (* PFNGLGETINTEGERVPROC) (GLenum pname, GLint *data);
typedef void (* PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
typedef void (* PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
typedef void (* PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
typedef void (* PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
typedef void (* PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
typedef void (* PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
typedef void (* PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
typedef const GLubyte *(* PFNGLGETSTRINGPROC) (GLenum name);
typedef void (* PFNGLGETTEXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
typedef void (* PFNGLGETTEXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
typedef void (* PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
typedef void (* PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
typedef GLint (* PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
typedef void (* PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
typedef void (* PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
typedef void (* PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer);
typedef void (* PFNGLHINTPROC) (GLenum target, GLenum mode);
typedef GLboolean (* PFNGLISBUFFERPROC) (GLuint buffer);
typedef GLboolean (* PFNGLISENABLEDPROC) (GLenum cap);
typedef GLboolean (* PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer);
typedef GLboolean (* PFNGLISPROGRAMPROC) (GLuint program);
typedef GLboolean (* PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer);
typedef GLboolean (* PFNGLISSHADERPROC) (GLuint shader);
typedef GLboolean (* PFNGLISTEXTUREPROC) (GLuint texture);
typedef void (* PFNGLLINEWIDTHPROC) (GLfloat width);
typedef void (* PFNGLLINKPROGRAMPROC) (GLuint program);
typedef void (* PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param);
typedef void (* PFNGLPOLYGONOFFSETPROC) (GLfloat factor, GLfloat units);
typedef void (* PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
typedef void (* PFNGLRELEASESHADERCOMPILERPROC) (void);
typedef void (* PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
typedef void (* PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert);
typedef void (* PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
typedef void (* PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length);
typedef void (* PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
typedef void (* PFNGLSTENCILFUNCPROC) (GLenum func, GLint ref, GLuint mask);
typedef void (* PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask);
typedef void (* PFNGLSTENCILMASKPROC) (GLuint mask);
typedef void (* PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
typedef void (* PFNGLSTENCILOPPROC) (GLenum fail, GLenum zfail, GLenum zpass);
typedef void (* PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
typedef void (* PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
typedef void (* PFNGLTEXPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat param);
typedef void (* PFNGLTEXPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
typedef void (* PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param);
typedef void (* PFNGLTEXPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
typedef void (* PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
typedef void (* PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
typedef void (* PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
typedef void (* PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
typedef void (* PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
typedef void (* PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
typedef void (* PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
typedef void (* PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
typedef void (* PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
typedef void (* PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
typedef void (* PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
typedef void (* PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
typedef void (* PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
typedef void (* PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
typedef void (* PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
typedef void (* PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
typedef void (* PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
typedef void (* PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (* PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (* PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (* PFNGLUSEPROGRAMPROC) (GLuint program);
typedef void (* PFNGLVALIDATEPROGRAMPROC) (GLuint program);
typedef void (* PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
typedef void (* PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
typedef void (* PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
typedef void (* PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
typedef void (* PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
typedef void (* PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
typedef void (* PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
typedef void (* PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
typedef void (* PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
typedef void (* PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
void glActiveTexture (GLenum texture);
void glAttachShader (GLuint program, GLuint shader);
void glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
void glBindBuffer (GLenum target, GLuint buffer);
void glBindFramebuffer (GLenum target, GLuint framebuffer);
void glBindRenderbuffer (GLenum target, GLuint renderbuffer);
void glBindTexture (GLenum target, GLuint texture);
void glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
void glBlendEquation (GLenum mode);
void glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
void glBlendFunc (GLenum sfactor, GLenum dfactor);
void glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
void glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
void glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
GLenum glCheckFramebufferStatus (GLenum target);
void glClear (GLbitfield mask);
void glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
void glClearDepthf (GLfloat d);
void glClearStencil (GLint s);
void glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
void glCompileShader (GLuint shader);
void glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
void glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
void glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
void glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
GLuint glCreateProgram (void);
GLuint glCreateShader (GLenum type);
void glCullFace (GLenum mode);
void glDeleteBuffers (GLsizei n, const GLuint *buffers);
void glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);
void glDeleteProgram (GLuint program);
void glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);
void glDeleteShader (GLuint shader);
void glDeleteTextures (GLsizei n, const GLuint *textures);
void glDepthFunc (GLenum func);
void glDepthMask (GLboolean flag);
void glDepthRangef (GLfloat n, GLfloat f);
void glDetachShader (GLuint program, GLuint shader);
void glDisable (GLenum cap);
void glDisableVertexAttribArray (GLuint index);
void glDrawArrays (GLenum mode, GLint first, GLsizei count);
void glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices);
void glEnable (GLenum cap);
void glEnableVertexAttribArray (GLuint index);
void glFinish (void);
void glFlush (void);
void glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
void glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
void glFrontFace (GLenum mode);
void glGenBuffers (GLsizei n, GLuint *buffers);
void glGenerateMipmap (GLenum target);
void glGenFramebuffers (GLsizei n, GLuint *framebuffers);
void glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
void glGenTextures (GLsizei n, GLuint *textures);
void glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
void glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
void glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
GLint glGetAttribLocation (GLuint program, const GLchar *name);
void glGetBooleanv (GLenum pname, GLboolean *data);
void glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
GLenum glGetError (void);
void glGetFloatv (GLenum pname, GLfloat *data);
void glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
void glGetIntegerv (GLenum pname, GLint *data);
void glGetProgramiv (GLuint program, GLenum pname, GLint *params);
void glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
void glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
void glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
void glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
void glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
void glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
const GLubyte * glGetString (GLenum name);
void glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
void glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
void glGetUniformfv (GLuint program, GLint location, GLfloat *params);
void glGetUniformiv (GLuint program, GLint location, GLint *params);
GLint glGetUniformLocation (GLuint program, const GLchar *name);
void glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
void glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
void glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
void glHint (GLenum target, GLenum mode);
GLboolean glIsBuffer (GLuint buffer);
GLboolean glIsEnabled (GLenum cap);
GLboolean glIsFramebuffer (GLuint framebuffer);
GLboolean glIsProgram (GLuint program);
GLboolean glIsRenderbuffer (GLuint renderbuffer);
GLboolean glIsShader (GLuint shader);
GLboolean glIsTexture (GLuint texture);
void glLineWidth (GLfloat width);
void glLinkProgram (GLuint program);
void glPixelStorei (GLenum pname, GLint param);
void glPolygonOffset (GLfloat factor, GLfloat units);
void glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
void glReleaseShaderCompiler (void);
void glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
void glSampleCoverage (GLfloat value, GLboolean invert);
void glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
void glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length);
void glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
void glStencilFunc (GLenum func, GLint ref, GLuint mask);
void glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
void glStencilMask (GLuint mask);
void glStencilMaskSeparate (GLenum face, GLuint mask);
void glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
void glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
void glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
void glTexParameterf (GLenum target, GLenum pname, GLfloat param);
void glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
void glTexParameteri (GLenum target, GLenum pname, GLint param);
void glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
void glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
void glUniform1f (GLint location, GLfloat v0);
void glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
void glUniform1i (GLint location, GLint v0);
void glUniform1iv (GLint location, GLsizei count, const GLint *value);
void glUniform2f (GLint location, GLfloat v0, GLfloat v1);
void glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
void glUniform2i (GLint location, GLint v0, GLint v1);
void glUniform2iv (GLint location, GLsizei count, const GLint *value);
void glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
void glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
void glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
void glUniform3iv (GLint location, GLsizei count, const GLint *value);
void glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
void glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
void glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
void glUniform4iv (GLint location, GLsizei count, const GLint *value);
void glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
void glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
void glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
void glUseProgram (GLuint program);
void glValidateProgram (GLuint program);
void glVertexAttrib1f (GLuint index, GLfloat x);
void glVertexAttrib1fv (GLuint index, const GLfloat *v);
void glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
void glVertexAttrib2fv (GLuint index, const GLfloat *v);
void glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
void glVertexAttrib3fv (GLuint index, const GLfloat *v);
void glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
void glVertexAttrib4fv (GLuint index, const GLfloat *v);
void glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
void glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
enum { GL_ES_VERSION_3_0 = 1 };
typedef khronos_uint16_t GLhalf;
enum { GL_READ_BUFFER = 3074 };
enum { GL_UNPACK_ROW_LENGTH = 3314 };
enum { GL_UNPACK_SKIP_ROWS = 3315 };
enum { GL_UNPACK_SKIP_PIXELS = 3316 };
enum { GL_PACK_ROW_LENGTH = 3330 };
enum { GL_PACK_SKIP_ROWS = 3331 };
enum { GL_PACK_SKIP_PIXELS = 3332 };
enum { GL_COLOR = 6144 };
enum { GL_DEPTH = 6145 };
enum { GL_STENCIL = 6146 };
enum { GL_RED = 6403 };
enum { GL_RGB8 = 32849 };
enum { GL_RGBA8 = 32856 };
enum { GL_RGB10_A2 = 32857 };
enum { GL_TEXTURE_BINDING_3D = 32874 };
enum { GL_UNPACK_SKIP_IMAGES = 32877 };
enum { GL_UNPACK_IMAGE_HEIGHT = 32878 };
enum { GL_TEXTURE_3D = 32879 };
enum { GL_TEXTURE_WRAP_R = 32882 };
enum { GL_MAX_3D_TEXTURE_SIZE = 32883 };
enum { GL_UNSIGNED_INT_2_10_10_10_REV = 33640 };
enum { GL_MAX_ELEMENTS_VERTICES = 33000 };
enum { GL_MAX_ELEMENTS_INDICES = 33001 };
enum { GL_TEXTURE_MIN_LOD = 33082 };
enum { GL_TEXTURE_MAX_LOD = 33083 };
enum { GL_TEXTURE_BASE_LEVEL = 33084 };
enum { GL_TEXTURE_MAX_LEVEL = 33085 };
enum { GL_MIN = 32775 };
enum { GL_MAX = 32776 };
enum { GL_DEPTH_COMPONENT24 = 33190 };
enum { GL_MAX_TEXTURE_LOD_BIAS = 34045 };
enum { GL_TEXTURE_COMPARE_MODE = 34892 };
enum { GL_TEXTURE_COMPARE_FUNC = 34893 };
enum { GL_CURRENT_QUERY = 34917 };
enum { GL_QUERY_RESULT = 34918 };
enum { GL_QUERY_RESULT_AVAILABLE = 34919 };
enum { GL_BUFFER_MAPPED = 35004 };
enum { GL_BUFFER_MAP_POINTER = 35005 };
enum { GL_STREAM_READ = 35041 };
enum { GL_STREAM_COPY = 35042 };
enum { GL_STATIC_READ = 35045 };
enum { GL_STATIC_COPY = 35046 };
enum { GL_DYNAMIC_READ = 35049 };
enum { GL_DYNAMIC_COPY = 35050 };
enum { GL_MAX_DRAW_BUFFERS = 34852 };
enum { GL_DRAW_BUFFER0 = 34853 };
enum { GL_DRAW_BUFFER1 = 34854 };
enum { GL_DRAW_BUFFER2 = 34855 };
enum { GL_DRAW_BUFFER3 = 34856 };
enum { GL_DRAW_BUFFER4 = 34857 };
enum { GL_DRAW_BUFFER5 = 34858 };
enum { GL_DRAW_BUFFER6 = 34859 };
enum { GL_DRAW_BUFFER7 = 34860 };
enum { GL_DRAW_BUFFER8 = 34861 };
enum { GL_DRAW_BUFFER9 = 34862 };
enum { GL_DRAW_BUFFER10 = 34863 };
enum { GL_DRAW_BUFFER11 = 34864 };
enum { GL_DRAW_BUFFER12 = 34865 };
enum { GL_DRAW_BUFFER13 = 34866 };
enum { GL_DRAW_BUFFER14 = 34867 };
enum { GL_DRAW_BUFFER15 = 34868 };
enum { GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = 35657 };
enum { GL_MAX_VERTEX_UNIFORM_COMPONENTS = 35658 };
enum { GL_SAMPLER_3D = 35679 };
enum { GL_SAMPLER_2D_SHADOW = 35682 };
enum { GL_FRAGMENT_SHADER_DERIVATIVE_HINT = 35723 };
enum { GL_PIXEL_PACK_BUFFER = 35051 };
enum { GL_PIXEL_UNPACK_BUFFER = 35052 };
enum { GL_PIXEL_PACK_BUFFER_BINDING = 35053 };
enum { GL_PIXEL_UNPACK_BUFFER_BINDING = 35055 };
enum { GL_FLOAT_MAT2x3 = 35685 };
enum { GL_FLOAT_MAT2x4 = 35686 };
enum { GL_FLOAT_MAT3x2 = 35687 };
enum { GL_FLOAT_MAT3x4 = 35688 };
enum { GL_FLOAT_MAT4x2 = 35689 };
enum { GL_FLOAT_MAT4x3 = 35690 };
enum { GL_SRGB = 35904 };
enum { GL_SRGB8 = 35905 };
enum { GL_SRGB8_ALPHA8 = 35907 };
enum { GL_COMPARE_REF_TO_TEXTURE = 34894 };
enum { GL_MAJOR_VERSION = 33307 };
enum { GL_MINOR_VERSION = 33308 };
enum { GL_NUM_EXTENSIONS = 33309 };
enum { GL_RGBA32F = 34836 };
enum { GL_RGB32F = 34837 };
enum { GL_RGBA16F = 34842 };
enum { GL_RGB16F = 34843 };
enum { GL_VERTEX_ATTRIB_ARRAY_INTEGER = 35069 };
enum { GL_MAX_ARRAY_TEXTURE_LAYERS = 35071 };
enum { GL_MIN_PROGRAM_TEXEL_OFFSET = 35076 };
enum { GL_MAX_PROGRAM_TEXEL_OFFSET = 35077 };
enum { GL_MAX_VARYING_COMPONENTS = 35659 };
enum { GL_TEXTURE_2D_ARRAY = 35866 };
enum { GL_TEXTURE_BINDING_2D_ARRAY = 35869 };
enum { GL_R11F_G11F_B10F = 35898 };
enum { GL_UNSIGNED_INT_10F_11F_11F_REV = 35899 };
enum { GL_RGB9_E5 = 35901 };
enum { GL_UNSIGNED_INT_5_9_9_9_REV = 35902 };
enum { GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH = 35958 };
enum { GL_TRANSFORM_FEEDBACK_BUFFER_MODE = 35967 };
enum { GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 35968 };
enum { GL_TRANSFORM_FEEDBACK_VARYINGS = 35971 };
enum { GL_TRANSFORM_FEEDBACK_BUFFER_START = 35972 };
enum { GL_TRANSFORM_FEEDBACK_BUFFER_SIZE = 35973 };
enum { GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 35976 };
enum { GL_RASTERIZER_DISCARD = 35977 };
enum { GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 35978 };
enum { GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 35979 };
enum { GL_INTERLEAVED_ATTRIBS = 35980 };
enum { GL_SEPARATE_ATTRIBS = 35981 };
enum { GL_TRANSFORM_FEEDBACK_BUFFER = 35982 };
enum { GL_TRANSFORM_FEEDBACK_BUFFER_BINDING = 35983 };
enum { GL_RGBA32UI = 36208 };
enum { GL_RGB32UI = 36209 };
enum { GL_RGBA16UI = 36214 };
enum { GL_RGB16UI = 36215 };
enum { GL_RGBA8UI = 36220 };
enum { GL_RGB8UI = 36221 };
enum { GL_RGBA32I = 36226 };
enum { GL_RGB32I = 36227 };
enum { GL_RGBA16I = 36232 };
enum { GL_RGB16I = 36233 };
enum { GL_RGBA8I = 36238 };
enum { GL_RGB8I = 36239 };
enum { GL_RED_INTEGER = 36244 };
enum { GL_RGB_INTEGER = 36248 };
enum { GL_RGBA_INTEGER = 36249 };
enum { GL_SAMPLER_2D_ARRAY = 36289 };
enum { GL_SAMPLER_2D_ARRAY_SHADOW = 36292 };
enum { GL_SAMPLER_CUBE_SHADOW = 36293 };
enum { GL_UNSIGNED_INT_VEC2 = 36294 };
enum { GL_UNSIGNED_INT_VEC3 = 36295 };
enum { GL_UNSIGNED_INT_VEC4 = 36296 };
enum { GL_INT_SAMPLER_2D = 36298 };
enum { GL_INT_SAMPLER_3D = 36299 };
enum { GL_INT_SAMPLER_CUBE = 36300 };
enum { GL_INT_SAMPLER_2D_ARRAY = 36303 };
enum { GL_UNSIGNED_INT_SAMPLER_2D = 36306 };
enum { GL_UNSIGNED_INT_SAMPLER_3D = 36307 };
enum { GL_UNSIGNED_INT_SAMPLER_CUBE = 36308 };
enum { GL_UNSIGNED_INT_SAMPLER_2D_ARRAY = 36311 };
enum { GL_BUFFER_ACCESS_FLAGS = 37151 };
enum { GL_BUFFER_MAP_LENGTH = 37152 };
enum { GL_BUFFER_MAP_OFFSET = 37153 };
enum { GL_DEPTH_COMPONENT32F = 36012 };
enum { GL_DEPTH32F_STENCIL8 = 36013 };
enum { GL_FLOAT_32_UNSIGNED_INT_24_8_REV = 36269 };
enum { GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 33296 };
enum { GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 33297 };
enum { GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE = 33298 };
enum { GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 33299 };
enum { GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 33300 };
enum { GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 33301 };
enum { GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 33302 };
enum { GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 33303 };
enum { GL_FRAMEBUFFER_DEFAULT = 33304 };
enum { GL_FRAMEBUFFER_UNDEFINED = 33305 };
enum { GL_DEPTH_STENCIL_ATTACHMENT = 33306 };
enum { GL_DEPTH_STENCIL = 34041 };
enum { GL_UNSIGNED_INT_24_8 = 34042 };
enum { GL_DEPTH24_STENCIL8 = 35056 };
enum { GL_UNSIGNED_NORMALIZED = 35863 };
enum { GL_DRAW_FRAMEBUFFER_BINDING = 36006 };
enum { GL_READ_FRAMEBUFFER = 36008 };
enum { GL_DRAW_FRAMEBUFFER = 36009 };
enum { GL_READ_FRAMEBUFFER_BINDING = 36010 };
enum { GL_RENDERBUFFER_SAMPLES = 36011 };
enum { GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 36052 };
enum { GL_MAX_COLOR_ATTACHMENTS = 36063 };
enum { GL_COLOR_ATTACHMENT1 = 36065 };
enum { GL_COLOR_ATTACHMENT2 = 36066 };
enum { GL_COLOR_ATTACHMENT3 = 36067 };
enum { GL_COLOR_ATTACHMENT4 = 36068 };
enum { GL_COLOR_ATTACHMENT5 = 36069 };
enum { GL_COLOR_ATTACHMENT6 = 36070 };
enum { GL_COLOR_ATTACHMENT7 = 36071 };
enum { GL_COLOR_ATTACHMENT8 = 36072 };
enum { GL_COLOR_ATTACHMENT9 = 36073 };
enum { GL_COLOR_ATTACHMENT10 = 36074 };
enum { GL_COLOR_ATTACHMENT11 = 36075 };
enum { GL_COLOR_ATTACHMENT12 = 36076 };
enum { GL_COLOR_ATTACHMENT13 = 36077 };
enum { GL_COLOR_ATTACHMENT14 = 36078 };
enum { GL_COLOR_ATTACHMENT15 = 36079 };
enum { GL_COLOR_ATTACHMENT16 = 36080 };
enum { GL_COLOR_ATTACHMENT17 = 36081 };
enum { GL_COLOR_ATTACHMENT18 = 36082 };
enum { GL_COLOR_ATTACHMENT19 = 36083 };
enum { GL_COLOR_ATTACHMENT20 = 36084 };
enum { GL_COLOR_ATTACHMENT21 = 36085 };
enum { GL_COLOR_ATTACHMENT22 = 36086 };
enum { GL_COLOR_ATTACHMENT23 = 36087 };
enum { GL_COLOR_ATTACHMENT24 = 36088 };
enum { GL_COLOR_ATTACHMENT25 = 36089 };
enum { GL_COLOR_ATTACHMENT26 = 36090 };
enum { GL_COLOR_ATTACHMENT27 = 36091 };
enum { GL_COLOR_ATTACHMENT28 = 36092 };
enum { GL_COLOR_ATTACHMENT29 = 36093 };
enum { GL_COLOR_ATTACHMENT30 = 36094 };
enum { GL_COLOR_ATTACHMENT31 = 36095 };
enum { GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 36182 };
enum { GL_MAX_SAMPLES = 36183 };
enum { GL_HALF_FLOAT = 5131 };
enum { GL_MAP_READ_BIT = 1 };
enum { GL_MAP_WRITE_BIT = 2 };
enum { GL_MAP_INVALIDATE_RANGE_BIT = 4 };
enum { GL_MAP_INVALIDATE_BUFFER_BIT = 8 };
enum { GL_MAP_FLUSH_EXPLICIT_BIT = 16 };
enum { GL_MAP_UNSYNCHRONIZED_BIT = 32 };
enum { GL_RG = 33319 };
enum { GL_RG_INTEGER = 33320 };
enum { GL_R8 = 33321 };
enum { GL_RG8 = 33323 };
enum { GL_R16F = 33325 };
enum { GL_R32F = 33326 };
enum { GL_RG16F = 33327 };
enum { GL_RG32F = 33328 };
enum { GL_R8I = 33329 };
enum { GL_R8UI = 33330 };
enum { GL_R16I = 33331 };
enum { GL_R16UI = 33332 };
enum { GL_R32I = 33333 };
enum { GL_R32UI = 33334 };
enum { GL_RG8I = 33335 };
enum { GL_RG8UI = 33336 };
enum { GL_RG16I = 33337 };
enum { GL_RG16UI = 33338 };
enum { GL_RG32I = 33339 };
enum { GL_RG32UI = 33340 };
enum { GL_VERTEX_ARRAY_BINDING = 34229 };
enum { GL_R8_SNORM = 36756 };
enum { GL_RG8_SNORM = 36757 };
enum { GL_RGB8_SNORM = 36758 };
enum { GL_RGBA8_SNORM = 36759 };
enum { GL_SIGNED_NORMALIZED = 36764 };
enum { GL_PRIMITIVE_RESTART_FIXED_INDEX = 36201 };
enum { GL_COPY_READ_BUFFER = 36662 };
enum { GL_COPY_WRITE_BUFFER = 36663 };
enum { GL_COPY_READ_BUFFER_BINDING = 36662 };
enum { GL_COPY_WRITE_BUFFER_BINDING = 36663 };
enum { GL_UNIFORM_BUFFER = 35345 };
enum { GL_UNIFORM_BUFFER_BINDING = 35368 };
enum { GL_UNIFORM_BUFFER_START = 35369 };
enum { GL_UNIFORM_BUFFER_SIZE = 35370 };
enum { GL_MAX_VERTEX_UNIFORM_BLOCKS = 35371 };
enum { GL_MAX_FRAGMENT_UNIFORM_BLOCKS = 35373 };
enum { GL_MAX_COMBINED_UNIFORM_BLOCKS = 35374 };
enum { GL_MAX_UNIFORM_BUFFER_BINDINGS = 35375 };
enum { GL_MAX_UNIFORM_BLOCK_SIZE = 35376 };
enum { GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 35377 };
enum { GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 35379 };
enum { GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 35380 };
enum { GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = 35381 };
enum { GL_ACTIVE_UNIFORM_BLOCKS = 35382 };
enum { GL_UNIFORM_TYPE = 35383 };
enum { GL_UNIFORM_SIZE = 35384 };
enum { GL_UNIFORM_NAME_LENGTH = 35385 };
enum { GL_UNIFORM_BLOCK_INDEX = 35386 };
enum { GL_UNIFORM_OFFSET = 35387 };
enum { GL_UNIFORM_ARRAY_STRIDE = 35388 };
enum { GL_UNIFORM_MATRIX_STRIDE = 35389 };
enum { GL_UNIFORM_IS_ROW_MAJOR = 35390 };
enum { GL_UNIFORM_BLOCK_BINDING = 35391 };
enum { GL_UNIFORM_BLOCK_DATA_SIZE = 35392 };
enum { GL_UNIFORM_BLOCK_NAME_LENGTH = 35393 };
enum { GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS = 35394 };
enum { GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 35395 };
enum { GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 35396 };
enum { GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 35398 };
enum { GL_INVALID_INDEX = 0xFFFFFFFFu };
enum { GL_MAX_VERTEX_OUTPUT_COMPONENTS = 37154 };
enum { GL_MAX_FRAGMENT_INPUT_COMPONENTS = 37157 };
enum { GL_MAX_SERVER_WAIT_TIMEOUT = 37137 };
enum { GL_OBJECT_TYPE = 37138 };
enum { GL_SYNC_CONDITION = 37139 };
enum { GL_SYNC_STATUS = 37140 };
enum { GL_SYNC_FLAGS = 37141 };
enum { GL_SYNC_FENCE = 37142 };
enum { GL_SYNC_GPU_COMMANDS_COMPLETE = 37143 };
enum { GL_UNSIGNALED = 37144 };
enum { GL_SIGNALED = 37145 };
enum { GL_ALREADY_SIGNALED = 37146 };
enum { GL_TIMEOUT_EXPIRED = 37147 };
enum { GL_CONDITION_SATISFIED = 37148 };
enum { GL_WAIT_FAILED = 37149 };
enum { GL_SYNC_FLUSH_COMMANDS_BIT = 1 };
/* #define GL_TIMEOUT_IGNORED                0xFFFFFFFFFFFFFFFFull ### string, not number "0xFFFFFFFFFFFFFFFFull" */
enum { GL_VERTEX_ATTRIB_ARRAY_DIVISOR = 35070 };
enum { GL_ANY_SAMPLES_PASSED = 35887 };
enum { GL_ANY_SAMPLES_PASSED_CONSERVATIVE = 36202 };
enum { GL_SAMPLER_BINDING = 35097 };
enum { GL_RGB10_A2UI = 36975 };
enum { GL_TEXTURE_SWIZZLE_R = 36418 };
enum { GL_TEXTURE_SWIZZLE_G = 36419 };
enum { GL_TEXTURE_SWIZZLE_B = 36420 };
enum { GL_TEXTURE_SWIZZLE_A = 36421 };
enum { GL_GREEN = 6404 };
enum { GL_BLUE = 6405 };
enum { GL_INT_2_10_10_10_REV = 36255 };
enum { GL_TRANSFORM_FEEDBACK = 36386 };
enum { GL_TRANSFORM_FEEDBACK_PAUSED = 36387 };
enum { GL_TRANSFORM_FEEDBACK_ACTIVE = 36388 };
enum { GL_TRANSFORM_FEEDBACK_BINDING = 36389 };
enum { GL_PROGRAM_BINARY_RETRIEVABLE_HINT = 33367 };
enum { GL_PROGRAM_BINARY_LENGTH = 34625 };
enum { GL_NUM_PROGRAM_BINARY_FORMATS = 34814 };
enum { GL_PROGRAM_BINARY_FORMATS = 34815 };
enum { GL_COMPRESSED_R11_EAC = 37488 };
enum { GL_COMPRESSED_SIGNED_R11_EAC = 37489 };
enum { GL_COMPRESSED_RG11_EAC = 37490 };
enum { GL_COMPRESSED_SIGNED_RG11_EAC = 37491 };
enum { GL_COMPRESSED_RGB8_ETC2 = 37492 };
enum { GL_COMPRESSED_SRGB8_ETC2 = 37493 };
enum { GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 37494 };
enum { GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 37495 };
enum { GL_COMPRESSED_RGBA8_ETC2_EAC = 37496 };
enum { GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 37497 };
enum { GL_TEXTURE_IMMUTABLE_FORMAT = 37167 };
enum { GL_MAX_ELEMENT_INDEX = 36203 };
enum { GL_NUM_SAMPLE_COUNTS = 37760 };
enum { GL_TEXTURE_IMMUTABLE_LEVELS = 33503 };
typedef void (* PFNGLREADBUFFERPROC) (GLenum src);
typedef void (* PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
typedef void (* PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
typedef void (* PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
typedef void (* PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
typedef void (* PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
typedef void (* PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
typedef void (* PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids);
typedef void (* PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids);
typedef GLboolean (* PFNGLISQUERYPROC) (GLuint id);
typedef void (* PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
typedef void (* PFNGLENDQUERYPROC) (GLenum target);
typedef void (* PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);
typedef void (* PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params);
typedef GLboolean (* PFNGLUNMAPBUFFERPROC) (GLenum target);
typedef void (* PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, void **params);
typedef void (* PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);
typedef void (* PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (* PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (* PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (* PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (* PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (* PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
typedef void (* PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
typedef void (* PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
typedef void (* PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
typedef void *(* PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
typedef void (* PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
typedef void (* PFNGLBINDVERTEXARRAYPROC) (GLuint array);
typedef void (* PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays);
typedef void (* PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays);
typedef GLboolean (* PFNGLISVERTEXARRAYPROC) (GLuint array);
typedef void (* PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data);
typedef void (* PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode);
typedef void (* PFNGLENDTRANSFORMFEEDBACKPROC) (void);
typedef void (* PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
typedef void (* PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer);
typedef void (* PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
typedef void (* PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
typedef void (* PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
typedef void (* PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params);
typedef void (* PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params);
typedef void (* PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
typedef void (* PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
typedef void (* PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v);
typedef void (* PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v);
typedef void (* PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params);
typedef GLint (* PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name);
typedef void (* PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0);
typedef void (* PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1);
typedef void (* PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
typedef void (* PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
typedef void (* PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value);
typedef void (* PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value);
typedef void (* PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value);
typedef void (* PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value);
typedef void (* PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value);
typedef void (* PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value);
typedef void (* PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value);
typedef void (* PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
typedef const GLubyte *(* PFNGLGETSTRINGIPROC) (GLenum name, GLuint index);
typedef void (* PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
typedef void (* PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
typedef void (* PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
typedef GLuint (* PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName);
typedef void (* PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
typedef void (* PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
typedef void (* PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
typedef void (* PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
typedef void (* PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
typedef GLsync (* PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags);
typedef GLboolean (* PFNGLISSYNCPROC) (GLsync sync);
typedef void (* PFNGLDELETESYNCPROC) (GLsync sync);
typedef GLenum (* PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
typedef void (* PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
typedef void (* PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data);
typedef void (* PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei count, GLsizei *length, GLint *values);
typedef void (* PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data);
typedef void (* PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params);
typedef void (* PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers);
typedef void (* PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers);
typedef GLboolean (* PFNGLISSAMPLERPROC) (GLuint sampler);
typedef void (* PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler);
typedef void (* PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param);
typedef void (* PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param);
typedef void (* PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param);
typedef void (* PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param);
typedef void (* PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params);
typedef void (* PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params);
typedef void (* PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor);
typedef void (* PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id);
typedef void (* PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids);
typedef void (* PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids);
typedef GLboolean (* PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id);
typedef void (* PFNGLPAUSETRANSFORMFEEDBACKPROC) (void);
typedef void (* PFNGLRESUMETRANSFORMFEEDBACKPROC) (void);
typedef void (* PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
typedef void (* PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
typedef void (* PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value);
typedef void (* PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
typedef void (* PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
typedef void (* PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
typedef void (* PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
typedef void (* PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint *params);
void glReadBuffer (GLenum src);
void glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
void glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
void glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
void glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
void glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
void glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
void glGenQueries (GLsizei n, GLuint *ids);
void glDeleteQueries (GLsizei n, const GLuint *ids);
GLboolean glIsQuery (GLuint id);
void glBeginQuery (GLenum target, GLuint id);
void glEndQuery (GLenum target);
void glGetQueryiv (GLenum target, GLenum pname, GLint *params);
void glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params);
GLboolean glUnmapBuffer (GLenum target);
void glGetBufferPointerv (GLenum target, GLenum pname, void **params);
void glDrawBuffers (GLsizei n, const GLenum *bufs);
void glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
void glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
void glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
void glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
void glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
void glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
void glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
void glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
void glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
void * glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
void glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length);
void glBindVertexArray (GLuint array);
void glDeleteVertexArrays (GLsizei n, const GLuint *arrays);
void glGenVertexArrays (GLsizei n, GLuint *arrays);
GLboolean glIsVertexArray (GLuint array);
void glGetIntegeri_v (GLenum target, GLuint index, GLint *data);
void glBeginTransformFeedback (GLenum primitiveMode);
void glEndTransformFeedback (void);
void glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
void glBindBufferBase (GLenum target, GLuint index, GLuint buffer);
void glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
void glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
void glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
void glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params);
void glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params);
void glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w);
void glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
void glVertexAttribI4iv (GLuint index, const GLint *v);
void glVertexAttribI4uiv (GLuint index, const GLuint *v);
void glGetUniformuiv (GLuint program, GLint location, GLuint *params);
GLint glGetFragDataLocation (GLuint program, const GLchar *name);
void glUniform1ui (GLint location, GLuint v0);
void glUniform2ui (GLint location, GLuint v0, GLuint v1);
void glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2);
void glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
void glUniform1uiv (GLint location, GLsizei count, const GLuint *value);
void glUniform2uiv (GLint location, GLsizei count, const GLuint *value);
void glUniform3uiv (GLint location, GLsizei count, const GLuint *value);
void glUniform4uiv (GLint location, GLsizei count, const GLuint *value);
void glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value);
void glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value);
void glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value);
void glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
const GLubyte * glGetStringi (GLenum name, GLuint index);
void glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
void glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
void glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
GLuint glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName);
void glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
void glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
void glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
void glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
void glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
GLsync glFenceSync (GLenum condition, GLbitfield flags);
GLboolean glIsSync (GLsync sync);
void glDeleteSync (GLsync sync);
GLenum glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
void glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
void glGetInteger64v (GLenum pname, GLint64 *data);
void glGetSynciv (GLsync sync, GLenum pname, GLsizei count, GLsizei *length, GLint *values);
void glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data);
void glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params);
void glGenSamplers (GLsizei count, GLuint *samplers);
void glDeleteSamplers (GLsizei count, const GLuint *samplers);
GLboolean glIsSampler (GLuint sampler);
void glBindSampler (GLuint unit, GLuint sampler);
void glSamplerParameteri (GLuint sampler, GLenum pname, GLint param);
void glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param);
void glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param);
void glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param);
void glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params);
void glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params);
void glVertexAttribDivisor (GLuint index, GLuint divisor);
void glBindTransformFeedback (GLenum target, GLuint id);
void glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids);
void glGenTransformFeedbacks (GLsizei n, GLuint *ids);
GLboolean glIsTransformFeedback (GLuint id);
void glPauseTransformFeedback (void);
void glResumeTransformFeedback (void);
void glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
void glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
void glProgramParameteri (GLuint program, GLenum pname, GLint value);
void glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments);
void glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
void glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
void glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
void glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint *params);
/* + END   /usr/include/GLES3/gl3.h */
]]
return require 'ffi.load' 'GLESv2'
